package com.xian.im.common.event.system;

import com.google.common.eventbus.AsyncEventBus;
import com.xian.im.common.event.group.model.GroupEvent;
import com.xian.im.common.utils.sys.SpringContextHolder;

/**
 * @program: xian-im-server
 * @description:
 * @author: liru.xian
 * @create: 2021-02-01 17:02
 **/
public class EventBusUtil {

    /**
     *  群组事件触发
     * @param event
     */
    public static void postGroupEvent(GroupEvent event){
        AsyncEventBus asyncEventBus = SpringContextHolder.getBean(AsyncEventBus.class);
        asyncEventBus.post(event);
    }
}
